<h1>Site Management</h1>
<div id="login">
	<p class="error"><?php echo $session->read('Message.auth.message');?></p>
	<?php echo $form->create('User',array('action'=>'login','id'=>'loginform','name'=>'loginform'));?>
	<p><?php echo $form->input('username',array('label'=>'<strong>User name</strong>','error'=>'Please input user name','class'=>'inputText','div'=>''));?></p>
	<p><?php echo $form->input('password',array('label'=>'<strong>Password</strong>','error'=>'Please input password','class'=>'inputText','div'=>''));?></p>
	<a class="black_button" href="javascript:login();"><span>Login</span></a>
	<label><?php echo $this->Form->checkbox('forget_pass', array('label'=>false, 'div'=>false));?>Remember password</label>
	<?php echo $form->end();?>
	<br clear="all" />
</div>
<div id="forgot"><a href="#" class="forgotlink"><span>Forgot password?</span></a></div>

<script language="javascript">
document.getElementById('UserUsername').focus();
function login() {
	document.loginform.submit();
}
document.body.onkeypress = function (e) {
	var key = e.which||e.keyCode;	
	if (key == 13) {
		login();
		return false;			
	}
	return true;
}
</script>
